Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds asymmetric and symmetric SAM #48

Closed
wants to merge 12 commits into from
Closed

Conversation

eliocamp
Copy link
Contributor

@eliocamp eliocamp commented Oct 30, 2023

This adds the asymmetric and symmetric SAM indices.

I called the functions "asymsam", from "asymmeric SAM", but let me know if you want me to change them.

library(rsoi)

download_asymsam_monthly() |> 
  head()
#>   Lev Index       Date       Value Value_normalized
#> 1   1   sam 2023-09-01  0.05177943       0.14952028
#> 2   1  ssam 2023-09-01  0.43155471       0.06490490
#> 3   1  asam 2023-09-01 -0.37977528       0.21935814
#> 4   2   sam 2023-09-01  0.04575554       0.22199278
#> 5   2  ssam 2023-09-01  0.54510591       0.09215533
#> 6   2  asam 2023-09-01 -0.49935037       0.24345311


download_asymsam_daily(levels = c(700, 500)) |> 
  head()
#> Downloading level: 700
#> Downloading level: 500
#>   Lev Index       Date       Value    R.squared
#> 1 700  asam 1940-01-01 -0.13508871 0.0426478529
#> 2 700   sam 1940-01-01 -0.12471444 0.0054371573
#> 3 700  ssam 1940-01-01  0.01037427 0.0000442406
#> 4 700  asam 1940-01-02 -0.11471232 0.0345327849
#> 5 700   sam 1940-01-02  0.02685265 0.0002830512
#> 6 700  ssam 1940-01-02  0.14156497 0.0092506011

Created on 2023-10-30 with reprex v2.0.2

BTW: tests fail due to an issue in another function.

Closes #47

@boshek
Copy link
Owner

boshek commented Oct 30, 2023

Fixed up the actions in #49 & #50 - do you mind rebasing to see if that surfaces anything here?

@eliocamp
Copy link
Contributor Author

watch me diff, watch me rebase

This seems to solve the issues.
(there's a note that in abbr_month class(date) != "Date" should be inherits(date, "Date") , but that can be another PR.

@boshek
Copy link
Owner

boshek commented Oct 31, 2023

Hmm.... something seems to have gone awry here. I don't understand why the diff is looking like you updated the workflows when those are already updated on master. I see that you merged rather than rebased (no problem!) but I just uncertain why the diff is the way it is.

One last thing to potentially clean up: https://github.com/boshek/rsoi/actions/runs/6712731571/job/18242885434?pr=48#step:6:103 <- do you know why this is showing up?

@eliocamp
Copy link
Contributor Author

eliocamp commented Nov 2, 2023

Hmm.... something seems to have gone awry here. I don't understand why the diff is looking like you updated the workflows when those are already updated on master. I see that you merged rather than rebased (no problem!) but I just uncertain why the diff is the way it is.

I'm the wrong person to ask why anything is the way it is in git, honestly. I created a new branch with cleaner diffs and send a new PR: #51

One last thing to potentially clean up: https://github.com/boshek/rsoi/actions/runs/6712731571/job/18242885434?pr=48#step:6:103 <- do you know why this is showing up?

Oops. Yeah, I seem to have forgotten to update the .Rd files. Now fixed on the other PR.

@eliocamp eliocamp closed this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add asymmetric SAM index
2 participants